package dilmaj.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;

import dilmaj.shared.StarEntryVO;

public class SearchCloseHandler implements ClickHandler {
	private StarEntryVO baseVO;
	private StarServiceAsync starSvc = GWT.create(StarService.class);
	private StarTablePanel owner;
	private StarPanel basePanel;
	
	public SearchCloseHandler(StarEntryVO baseVO, StarTablePanel owner, StarPanel basePanel) {
		this.baseVO=baseVO;
		this.owner=owner;
		this.basePanel=basePanel;
	}
	
	@Override
	public void onClick(ClickEvent event) {
		// TODO Auto-generated method stub
		owner.setVisible(false);
		DataStore.closePanel(owner);
		owner.clearTable();
		basePanel.refresh();
	}
}
